package com.summer.shopping.controller;

import com.summer.shopping.domain.common.req.ReqHolder;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@CrossOrigin
@RequestMapping("test")
public class TestController {


    @RequestMapping("hello")
    public String hello(){
        Long userId = ReqHolder.getUserId();
        Integer permission = ReqHolder.getPermission();
        System.out.println("userId = " + userId);
        System.out.println("permission = "+permission);
        return "hello";
    }
}
